--[[
-- * 移除时,每层+N点能量
-- */]]

---@class BuffEffect683100 : BaseBuffEffect
BuffEffect683100 = ClientFight.CreateClass("BuffEffect683100", ClientFight.BaseBuffEffect)
local t = BuffEffect683100

---@param fight Fight
---@param buff FighterBuff
function t:remove(fight, buff, force, ...)
    local target = buff.target;
    if (target:isDie()) then
        return ClientFight.BaseBuffEffect.remove(self, fight, buff, force, ...);
    end
    local add = buff.buffBean.f_BuffEffectValue[1] * buff.overlay;
    SkillRoleMgr.savePathFile("[" .. fight.frame .. "][EFFECT]Fighter " .. buff.target.fighterId .. " Buff:"
            .. buff.modelId .. " 移除时, 总增加能量 :" .. add .. " 层数:" .. buff.overlay);
    FighterManager.addEnergy(fight, target, 0, 0, add, EnergyChangeReasonEnum.BUFF);
    return ClientFight.BaseBuffEffect.remove(self, fight, buff, force, ...);
end

t.New()